package cn.com.generaldata.os.exportpojo;

import java.util.HashSet;
import java.util.Set;

import javax.xml.bind.annotation.XmlTransient;

import com.sun.xml.internal.bind.CycleRecoverable;

public class Industry implements java.io.Serializable, CycleRecoverable {

	private static final long serialVersionUID = 7164943229331249578L;

	private String id; // 行业分类ID
	private String dustryName; // 行业名称
	private String dustryDesc; // 行业描述
	private String typeId; // 0: 企业级用户对应的行业分类 1: 省级用户对应的行业分类
	private String dl; // 目录大类
	private String zl; // 目录中类
	private String xl; // 目录小类
	private String code;

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	private Set<DustryReport> dustryReports = new HashSet<DustryReport>(0);

	private Set<UserIndustry> userIndustrys = new HashSet<UserIndustry>(0);

	public Industry() {
	}

	public Industry(String id, String dustryName, String dustryDesc, String typeId, String dl, String zl, String xl,
			String code, Set<DustryReport> dustryReports, Set<UserIndustry> userIndustrys) {
		super();
		this.id = id;
		this.dustryName = dustryName;
		this.dustryDesc = dustryDesc;
		this.typeId = typeId;
		this.dl = dl;
		this.zl = zl;
		this.xl = xl;
		this.code = code;
		this.dustryReports = dustryReports;
		this.userIndustrys = userIndustrys;
	}

	/**
	 * 解决循环引用问题.
	 * 
	 * @param arg0
	 * @return
	 */
	@Override
	public Object onCycleDetected(Context arg0) {
		Industry temp = new Industry();
		temp.setId(id);
		return temp;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getDustryName() {
		return dustryName;
	}

	public void setDustryName(String dustryName) {
		this.dustryName = dustryName;
	}

	public String getDustryDesc() {
		return dustryDesc;
	}

	public void setDustryDesc(String dustryDesc) {
		this.dustryDesc = dustryDesc;
	}

	public String getTypeId() {
		return typeId;
	}

	public void setTypeId(String typeId) {
		this.typeId = typeId;
	}

	@XmlTransient
	public Set<DustryReport> getDustryReports() {
		return dustryReports;
	}

	public void setDustryReports(Set<DustryReport> dustryReports) {
		this.dustryReports = dustryReports;
	}

	public String getDl() {
		return dl;
	}

	public void setDl(String dl) {
		this.dl = dl;
	}

	public String getZl() {
		return zl;
	}

	public void setZl(String zl) {
		this.zl = zl;
	}

	public String getXl() {
		return xl;
	}

	public void setXl(String xl) {
		this.xl = xl;
	}

	public Set<UserIndustry> getUserIndustrys() {
		return userIndustrys;
	}

	public void setUserIndustrys(Set<UserIndustry> userIndustrys) {
		this.userIndustrys = userIndustrys;
	}

}
